import request from '@/utils/request'

export function getRoutes() {
  return request({
    url: '/vue-element-admin/routes',
    method: 'get'
  })
}

export function getRoles(params) {
  return request({
    url: '/api/app/smart-hotel-app-role/page-list-role',
    method: 'get',
    params
  })
}

export function addRole(data) {
  return request({
    url: '/api/app/smart-hotel-app-role/role',
    method: 'post',
    data
  })
}
export function getFid(id) {
  return request({
    url: `/api/app/smart-hotel-app-role/${id}/find-role`,
    method: 'get',
    id
  })
}
export function updateRole(id, data) {
  return request({
    url: `/api/app/smart-hotel-app-role/${id}/role`,
    method: 'put',
    data
  })
}

export function deleteRole(id) {
  return request({
    url: `/api/app/smart-hotel-app-role/${id}/role`,
    method: 'delete',
    id
  })
}